package com.li.menu;


/**
 * 菜单组合
 * 该类封装了一个按钮的数组,该数组的长度表示公众号显示的根菜单个数.
 * 形如:
 *  private static Menu getMenu() {  
        ItemButton btn11 = new ItemButton();  
        btn11.setName("天气预报");  
        btn11.setType("click");  
        btn11.setKey("11");  
  
        ItemButton btn12 = new ItemButton();  
        btn12.setName("公交查询");  
        btn12.setType("click");  
        btn12.setKey("12");  
  
        ItemButton btn13 = new ItemButton();  
        btn13.setName("周边搜索");  
        btn13.setType("click");  
        btn13.setKey("13");  
  
        ItemButton btn14 = new ItemButton();  
        btn14.setName("历史上的今天");  
        btn14.setType("click");  
        btn14.setKey("14");  
  
        ItemButton btn21 = new ItemButton();  
        btn21.setName("歌曲点播");  
        btn21.setType("click");  
        btn21.setKey("21");  
  
        ItemButton btn22 = new ItemButton();  
        btn22.setName("经典游戏");  
        btn22.setType("click");  
        btn22.setKey("22");  
  
        ItemButton btn23 = new ItemButton();  
        btn23.setName("美女电台");  
        btn23.setType("click");  
        btn23.setKey("23");  
  
        ItemButton btn24 = new ItemButton();  
        btn24.setName("人脸识别");  
        btn24.setType("click");  
        btn24.setKey("24");  
  
        ItemButton btn25 = new ItemButton();  
        btn25.setName("聊天唠嗑");  
        btn25.setType("click");  
        btn25.setKey("25");  
  
        ItemButton btn31 = new ItemButton();  
        btn31.setName("Q友圈");  
        btn31.setType("click");  
        btn31.setKey("31");  
  
        ItemButton btn32 = new ItemButton();  
        btn32.setName("电影排行榜");  
        btn32.setType("click");  
        btn32.setKey("32");  
  
        ItemButton btn33 = new ItemButton();  
        btn33.setName("幽默笑话");  
        btn33.setType("click");  
        btn33.setKey("33");  
  
        ComplexButton mainBtn1 = new ComplexButton();  
        mainBtn1.setName("生活助手");  
        mainBtn1.setSub_button(new ItemButton[] { btn11, btn12, btn13, btn14 });  
  
        ComplexButton mainBtn2 = new ComplexButton();  
        mainBtn2.setName("休闲驿站");  
        mainBtn2.setSub_button(new ItemButton[] { btn21, btn22, btn23, btn24, btn25 });  
  
        ComplexButton mainBtn3 = new ComplexButton();  
        mainBtn3.setName("更多体验");  
        mainBtn3.setSub_button(new ItemButton[] { btn31, btn32, btn33 });  
  
        
      	这是公众号xiaoqrobot目前的菜单结构，每个一级菜单都有二级菜单项<br> 
      
     	在某个一级菜单下没有二级菜单的情况，menu该如何定义呢？<br> 
      	比如，第三个一级菜单项不是“更多体验”，而直接是“幽默笑话”，那么menu应该这样定义：<br> 
      	menu.setButton(new Button[] { mainBtn1, mainBtn2, btn33 }); 
      
        Menu menu = new Menu();  
        menu.setButton(new BaseButton[] { mainBtn1, mainBtn2, mainBtn3 });  
  
        return menu;  
    }
 * @author liandyao
 * @date 2016-2-17 上午08:24:45
 */
public class Menu {  
    private BaseButton[] button;

	public BaseButton[] getButton() {
		return button;
	}

	public void setButton(BaseButton[] button) {
		this.button = button;
	}  
  
     
} 